package com.trkj.property_controller;

import com.trkj.dao.JueSeDao;
import com.trkj.entity.JueSeEntity;
import com.trkj.service.JueSeService;
import com.trkj.vo.AjaxResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@Slf4j
@CrossOrigin
public class JueSeController {
    @Resource
    private JueSeService jueSeService;

    @PostMapping("/findJueSe")
    public List<JueSeEntity> findJueSe(){
        return jueSeService.findJueSe();
    }
    @PutMapping("updateJueSe")
    public Boolean updateJueSe(@RequestBody JueSeEntity jueSeEntity){
        return jueSeService.updateJueSe(jueSeEntity);
    }
    @PostMapping("addJueSe")
    public AjaxResponse addJueSe(@RequestBody JueSeEntity jueSeEntity){
        return AjaxResponse.success(jueSeService.addJueSe(jueSeEntity));
    }
}
